<include file="public@header"/>
</head>
<body>
	<div><br><br>
		<form class="form-horizontal js-ajax-form" action="{:url('store/goods_post')}" method="post" enctype="multipart/form-data">
            <fieldset>
				<div class="control-group">
					<label class="control-label">{:lang('NUM')}</label>
					<div class="controls">
						<input type="hidden" name="goods_id" value="{$id}"/>
						<input type="hidden" name="from" value="{$from}"/>
						<input type="hidden" name="type" value="{$type}"/>
						<input type="text" name="num" value="" required class="form-control" id="goods_name"/>
						<span class="form-required">*</span>
					</div>
				</div>
			</fieldset>
			<div class="form-actions">
            	<button class="btn btn-primary js-ajax-submit" type="submit" id="save_areabtn" data-close_layer="1" data-action="">保存</button>
            	<a class="btn btn-default" id="js-dialog-close">关闭</a>
            </div>
		</form>
	</div>
	<script type="text/javascript" src="__STATIC__/js/admin.js?v={:time()}"></script>
	<script type="text/javascript" src="__STATIC__/js/layer/layer.js"></script>
    <script type="text/javascript">
		function saveInfo(){
            $.post("{:url('store/goods_post')}",$(".form-horizontal").serialize(),function(result){
                if(result.code==1){
                    layer.msg("保存成功");
                   /* setTimeout(function () {
                        try {
                            art.dialog.close();
                        } catch (err) {
                            Wind.css('artDialog');
                            Wind.use('artDialog', 'iframeTools', function () {
                                art.dialog.close();
                            });
                        };
                        //parent.location.href = "{:url('store/index')}";
                    },2000)*/
                }else{
                    layer.msg(result.msg);
                    //layer.close(index);
                }
            },'json')
		}
        //dialog弹窗内的关闭方法
        $('#js-dialog-close').on('click', function (e) {
            e.preventDefault();
            try {
                art.dialog.close();
            } catch (err) {
                Wind.css('artDialog');
                Wind.use('artDialog', 'iframeTools', function () {
                    art.dialog.close();
                });
            }
            ;
        });
    </script>
</body>
</html>